package com.eedi.sys.enums;

import com.eedi.framework.common.enums.BaseEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

/**
 * 系统组件异常类型
 * @author zybourn
 */
@Getter
@AllArgsConstructor
@ToString
public enum SysErrorCodeType implements BaseEnum<Integer,String> {
    /**
     * WEB
     */
    BASE(1000, "WEB"),
    /**
     * CONFIG
     */
    CONFIG(2000, "CONFIG"),
    /**
     * DEPT
     */
    DEPT(3000, "DEPT"),
    /**
     * DICT
     */
    DICT(4000, "DICT"),
    /**
     * ERRORCODE
     */
    ERRORCODE(5000, "ERRORCODE"),
    /**
     * FILE
     */
    FILE(6000, "FILE"),
    /**
     * INITIALIZE
     */
    INITIALIZE(7000, "INITIALIZE"),
    /**
     * LOGGER
     */
    LOGGER(8000, "LOGGER"),
    /**
     * MAIL
     */
    MAIL(9000, "MAIL"),
    /**
     * NOTIFY
     */
    NOTIFY(10000, "NOTIFY"),
    /**
     * OAUTH2
     */
    OAUTH2(11000, "OAUTH2"),
    /**
     * PERMISSION
     */
    PERMISSION(12000, "PERMISSION"),
    /**
     * PROTOCOL
     */
    PROTOCOL(13000, "PROTOCOL"),
    /**
     * SENSITIVE_WORD
     */
    SENSITIVE_WORD(14000, "SENSITIVE_WORD"),
    /**
     * SMS
     */
    SMS(15000, "SMS"),
    /**
     * SOCIAL
     */
    SOCIAL(16000, "SOCIAL"),
    /**
     * TENANT
     */
    TENANT(17000, "TENANT"),
    /**
     * USER
     */
    USER(18000, "USER"),
    /**
     * USER
     */
    ORG_CONFIG(19000, "ORG_CONFIG"),
    /**
     * TEMPLATE
     */
    TEMPLATE(20000, "TEMPLATE"),
    /**
     * EVENT
     */
    EVENT(21000, "EVENT"),
    ;
    /**
     * 异常编码
     */
    private Integer code;


    /**
     * 描述
     */
    private String desc;

    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getDesc() {
        return this.desc;
    }

    @Override
    public String title() {
        return "基础架构组件异常类型";
    }
}
